﻿using System.Collections;
using UnityEngine;

[CreateAssetMenu(menuName = "Assets/怪物行为逻辑/Pursuit", fileName = "PursuitBase")]
public class EnemyPursuitSOBase : EnemyStateSOBase
{
    int timerID;
    public override void OnEnter(EnemyStateType fromStateType)
    {
        Debug.Log("OnEnter   Pursuit");
        timerID = TimerManager.Instance.AddTimer(2, 1, true, null, null, null, null, () =>
        {
            enemy.controller.TransilateType(EnemyStateType.Idle);
            TimerManager.Instance.RemoveTimer(timerID);
        });
    }
    public override void OnUpdate()
    {
        //Debug.Log("OnUpdate");
    }

    public override void OnExit(EnemyStateType toStateType)
    {
        Debug.Log("OnExit   Pursuit");
    }
}